ruby:
  custom_data = JSON.parse message.custom_data
tr
  td
    = message.id
  td
    = link_to message.group_name, group_path(message.group)
    br
      = message.group_type
  td
    = message.timestamp.strftime("%Y-%m-%d %H:%M:%S")
  td style="text-align:center"
    div
      img.img-circle src=custom_data["fromUserAvatar"] style="width:3.2em;height:3.2em"
    div
      = link_to message.user_name, user_messages_path(message.user_id)
  td
    - if message.content_type == 'text'
      = emojify(message.message)
    - else
      = image_tag(messages_image_path(message))
  td
    - if message.is_deleted
      | 已删除
    - else
      = link_to '删除', destroy_message_path(message)
